from fastapi import APIRouter

from .handler_chat import do_chat, do_chat_sse, ChatPayload

router = APIRouter(prefix="/apis/chat", tags=["chat"])


@router.post("/")
def chat(payload: ChatPayload):
    return do_chat(payload)


@router.post("/sse")
def chat_sse(payload: ChatPayload):
    return do_chat_sse(payload)
